package com.fgba.express.data.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fgba.express.comm.enums.Sex;
import com.fgba.express.comm.enums.State;
import com.fgba.express.core.dto.BaseDto;
import com.fgba.express.data.entity.UserRoleMapping;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用户Dto
 * </p>
 *
 * @author fgba
 * @since 2022-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(value = JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "UserDto对象", description = "用户Dto")
public class UserDto extends BaseDto {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "性别")
    private Sex sex;

    @ApiModelProperty(value = "出生日期")
    private LocalDate birthday;

    @ApiModelProperty(value = "用户角色ID列表")
    private List<Long> roleIds;

    @ApiModelProperty(value = "最后登录时间")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty(value = "用户权限")
    private List<String> access;
    /**
     * 状态，0为删除，1为正常，2为禁用
     */
    @ApiModelProperty(value = "状态")
    private State state;
}
